Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 5 - Bitmap Shapes / Bitmap Shapes Reference
Functions / Editing Bitmaps


GXSetBitmapParts

You can use the GXSetBitmapParts function to replace the pixel values in a rectangular subsection of a bitmap's pixel image.

void GXSetBitmapParts(gxShape target, const gxRectangle *bounds,
                      gxShape bitmapShape);
target
A reference to the bitmap shape containing the pixels to replace.
bounds
A pointer to a gxRectangle structure indicating which part of the target bitmap to replace.
bitmapShape
A reference to a bitmap shape containing the pixel values to use when replacing the specified pixels in the target bitmap shape.
DESCRIPTION
The GXSetBitmapParts function copies the pixel values (starting at the upper-left corner of the pixel image) of the source bitmap shape (which is indicated by the bitmapShape parameter) to the pixel image of the target bitmap shape. The bounds parameter determines how many rows and columns this function copies and where in the target bitmap the function places the copied pixel values.

The pixel image of the source bitmap may not be smaller than the size indicated by the bounds parameter; that is, the number of rows and columns in the pixel image of the source bitmap shape may not be less than the height and width of the specified rectangle, respectively.

The source and target bitmap shapes must have the same pixel size, color space, and color set.

This function posts a functionality_unimplemented error for disk-based bitmaps.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
parameter_is_nil 
parameter_out_of_range(debugging only)
point_does_not_intersect_bitmap(debugging only)
functionality_unimplemented(debugging only)
Warnings 
shape_does_not_contain_a_bitmap(debugging only)
SEE ALSO
For examples using this function, see "Editing Part of a Bitmap" beginning on page 5-53.

For information about the gxBitmap structure, see "The Bitmap Geometry Structure" beginning on page 5-62.

For information about the gxLongRectangle structure, see "The Long Rectangle Structure" on page 5-64.

For information about pixels and pixel images, see "Bitmap Geometries" beginning on page 5-5

To change the pixel value of a single pixel, use the GXSetShapePixel function, which is described on page 5-72.

To extract a rectangular subsection of a bitmap, use the GXGetBitmapParts function, which is described on page 5-74.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help